package com.neusoft.shopping.manager.controller;

import com.neusoft.shopping.manager.entity.FlowEntity;
import com.neusoft.shopping.manager.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class FlowController {
    @Autowired
    FlowService service;
    @RequestMapping("/flow_show")
    public ModelAndView flow_show(){
        ModelAndView modelAndView=new ModelAndView();
        List<FlowEntity> flows=service.qureyAll();
        modelAndView.addObject("flows",flows);
        modelAndView.setViewName("flow_show");
        return modelAndView;
    }
}
